<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:local="clr-namespace:QuickZip.UserControls.Explorer"
    xmlns:mvvm="http://www.quickzip.org/MVVM"
    xmlns:uc="http://www.quickzip.org/UserControls"
    xmlns:conv="http://www.quickzip.org/Converters"
     xmlns:sys="clr-namespace:System;assembly=mscorlib"
    >
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="pack://application:,,,/QuickZip.UserControls;component/Themes/Converters.xaml" />
        <ResourceDictionary Source="pack://application:,,,/QuickZip.UserControls;component/Themes/Brushes.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <DataTemplate DataType="{x:Type ImageSource}">
        <Image Stretch="Uniform" Height="16" Source="{Binding}"  />
    </DataTemplate>

    <HierarchicalDataTemplate x:Key="ActionViewModel_DateTemplate" ItemsSource="{Binding SubActions}">
        <StackPanel Orientation="Horizontal">
            <TextBlock Text="{Binding EmbeddedModel.Header}" 
                                   Visibility="{Binding ShowHeaderText, Converter={StaticResource btv}}" 
                               Margin="2,2" 
                               />
        </StackPanel>
    </HierarchicalDataTemplate>

    <Style x:Key="ToolbarItemStyle" TargetType="{x:Type uc:ToolbarMenuItem}" >
        <Setter Property="Command" Value="{Binding DoWorkCommand, Mode=OneWay}" />
        <Setter Property="CommandParameter" Value="{Binding DoWorkCommandParameter, Mode=OneWay}" />                
        <Setter Property="IsStepStop" Value="{Binding IsCommandEnabled, Mode=OneWay}" />
        <Setter Property="ToolTip" Value="{Binding EmbeddedModel.ToolTip, Mode=OneWay}" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="VerticalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalAlignment" Value="{Binding Alignment, Mode=OneWay}" />
        <Setter Property="Icon" Value="{Binding EmbeddedModel.HeaderIcon, Converter={StaticResource btbi}, Mode=OneWay}" />
        <Setter Property="IsSeparator" Value="{Binding IsSeparator, Mode=OneWay}" />
        <Setter Property="IsSliderEnabled" Value="{Binding ShowSlider, Mode=OneWay}" />
        <Setter Property="SliderMaximum" Value="{Binding SliderMaximum, Mode=OneWay}" />
        <Setter Property="SliderMinimum" Value="{Binding SliderMinimum, Mode=OneWay}" />
        <Setter Property="SliderValue" Value="{Binding SliderValue, Mode=TwoWay}" />
        <Setter Property="SliderStep" Value="{Binding SliderStep, Mode=OneWay}" />
        <Setter Property="ItemHeight" Value="{Binding ExtraItemHeight, Mode=OneWay}" />
        <Setter Property="ItemTemplate" Value="{DynamicResource ActionViewModel_DateTemplate}" />
        <Setter Property="IsStepStop" Value="{Binding IsStepStop, Mode=OneWay}" />
        <Setter Property="IsEnabled" Value="{Binding IsCommandEnabled, Mode=OneWay}" />
        <Setter Property="IsChecked" Value="{Binding EmbeddedModel.IsChecked,Mode=OneWay}" />
        <Setter Property="AllowDrop" Value="True" />
    </Style>

    <Style x:Key="qz_Toolbar_Style" TargetType="{x:Type uc:Toolbar2}">
        <Setter Property="ItemContainerStyle" Value="{StaticResource ToolbarItemStyle}" />
        <Setter Property="ItemTemplate" Value="{DynamicResource ActionViewModel_DateTemplate}" />
        <Setter Property="Background" Value="{StaticResource LightBrush}" />
        <Setter Property="BorderBrush" Value="{StaticResource SolidBorderBrush}" />
        <Setter Property="BorderThickness" Value="1,0" />
    </Style>


</ResourceDictionary>
